//
//  SendMsgBean.swift
//  Runner
//
//  Created by zzzzzzz on 2020/10/28.
//
import Foundation


/**
 * 创建时间: 2020/5/21 17:52
 * 作者:lixu
 * 功能描述: 发送房间消息对象
 * 修改时间:
 * 修改描述:
 */
public class SendMsgBean : BaseReqBean {
    /**
     * 发送者用户ID
     */
    private var userId:String = "";

    /**
     * 当前房间ID
     */
    private var roomId:String = "";
    
   
    
    /**
     * 发言内容
     */
    private var content:String = "";

    public override init() {
        super.init()
        msgId = MsgUtils.getUUID();
    }
    
    required init(from decoder: Decoder) throws {
        fatalError("init(from:) has not been implemented")
    }

    public func getUserId() ->String {
        return userId;
    }

    public func setUserId( userId:String) {
        self.userId = userId;
    }

    public func getRoomId()->String {
        return roomId;
    }

    public func setRoomId( roomId:String) {
        self.roomId = roomId;
    }
    
    
    public override func getMsgId()->String {
        return msgId ?? MsgUtils.getUUID();
    }

    public  override func setMsgId( msgId:String) {
        self.msgId = msgId;
    }
    

    public func getContent()->String {
        return content;
    }

    public func setContent( content:String) {
        self.content = content;
    }

    public func checkMsg()->Bool {
        return msgId != nil && !msgId!.isEmpty;
    }

}
